import updateManager from './common/updateManager';

App({
  onLaunch: function () {
    const { tokenId } = wx.getStorageSync('role');
    wx.setStorageSync('order.goodsRequestList', '');
    wx.setStorageSync('carList', '');
    if (!tokenId) {
      wx.redirectTo({
        url: '/pages/login/login.js',
      });
    } else {
      wx.redirectTo({
        url: '/pages/home/home.js',
      });
    }
  },
  onShow: function () {
    updateManager();
  },
});
